{
  function fn(x: { name: string }, y: number): string;
  function fn(x: { name: (name: string) => void; age: number }): boolean;
  // function fn(x: { name: string | ((name: string) => void); age?: number }, y?: number): unknown {
  //   return "oops";
  // }
  function fn(x: {name: any, age?: number }, y?: number): any {
      return "oops";
  }


  fn({ name: (name: string) => {}, age: 19 });

  fn({ name: "ck" }, 18)



  function func(foo: number, bar: true): string;
  function func(foo: number, bar?: false): number;
  function func(foo: number, bar?: boolean): string | number {
    if (bar) {
      return String(foo);
    } else {
      return foo * 599;
    }
  }

  const res1 = func(599); // number
  const res2 = func(599, true); // string
  const res3 = func(599, false); // number

  /**
   * 函数重载：函数名相同，函数签名不同
   * 函数签名：函数的参数类型，个数，返回值类型
   * 实现签名：必须满足所有的函数签名
   */
}